import { RequestData, GET, POST } from '@/utils/request-data';

const requestData = Object.create(RequestData);
requestData.setBaseUrl('/erp/dealer/store/product/order');

// 第三方店铺商品订单
export const shopifyOrderslist = params => requestData.base('/pull/shopify', POST);
export const orderPage = params => requestData.base('/page', POST, params);
export const orderRead = id => requestData.base(`/read/${id}`, POST);
export const orderEdit = params => requestData.base('/edit', POST, params);
export const orderConfirm = params => requestData.base('/confirm', POST, params);
export const orderNote = params => requestData.base('/note', POST, params); // 备注
export const orderUrgent = params => requestData.base('/urgent', POST, params); // 加急
export const orderUnurgent = params => requestData.base('/unurgent', POST, params); // 取消加急
export const orderPacking = params => requestData.base('/packing', POST, params); // 取消移至回收站
export const orderRecover = params => requestData.base('/recover', POST, params); // 取消移至回收站
export const orderUpload = (storeId, formData) => requestData.base(`/upload/order/${storeId}`, POST, formData); // 导入
export const trackingUpload = formData => requestData.base('/upload/tracking', POST, formData); // 导入
export const downOrderTemplate = params => requestData.base('/download/order/template', GET, params, false, true); // 下载订单模板
export const downTrackingTemplate = params => requestData.base('/download/tracking/template', GET, params, false, true); // 下载运单号模板
export const batchBindDesign = params => requestData.base('/batch/bind/design', POST, params);
export const bindDesign = params => requestData.base('/bind/design', POST, params); // 绑定设计
export const orderTrash = params => requestData.base('/trash', POST, params); // 回收站
export const orderGoBack = params => requestData.base('/goback', POST, params); // 回收站
export const orderExport = params => requestData.base('/export', GET, params, false, true); // 导出
export const changeChannel = params => requestData.base('/change/channel', POST, params);
export const changeOtherChannel = params => requestData.base('/change/other/channel', POST, params);
export const selfFulfill = params => requestData.base('/self/fulfill', POST, params);
export const orderDelete = ids => requestData.base('/delete', POST, ids);
export const applyLabel = params => requestData.base('/apply/label', POST, params);
